home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / September 96 / Re Writing to a SUSink < prev    next >
Encoding:
Internet Message Format  |  1996-09-19  |  1.4 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Writing to a SUSink
  2. Sent:        9/18/96 10:31 PM
  3. Received:    9/18/96 10:31 PM
  4. From:        jim@melongem.com (Jim Lloyd)
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List
  7.  
  8.  
  9. At 1:04 PM 9/18/96, Jerome Jahnke wrote:
  10. >I decided at a later date to make a part I had been working into an
  11. >embeddable part. So what I did is steal all the code from a new embeddable
  12. >part made with PartMaker but I can't open it.
  13. >
  14. >When I create the stationary I have this in my CBaseContent class.
  15. >
  16. >        unsigned long count = fProxyList->Count();
  17. >        archive << count;
  18. >
  19. >But when I try to open the stationry my Internalize function which looks
  20. >like this.
  21. >
  22. >        unsigned long count;
  23. >        archive >> count;
  24. >
  25. >says that count is 0x0000FFFF instead of 0x00000000 which is what I put
  26. >there. So why are the last four bytes F's instead of 0's and should I
  27. >convert those to FW_Fixed's which seem to write OK. I haven't tried that,
  28. >but this is the next step. I am curious if The sink is only reading or
  29. >writing the first four bytes. Or if I am doing something really really
  30. >wrong.
  31.  
  32. Jer,
  33.  
  34. The code you show should work correctly. I suspect that somewhere else
  35. you've got unbalanced reads and writes, so you're actually reading the
  36. wrong set of four bytes. Trace through both the write path and the read
  37. path and make sure everything is properly balanced.
  38.  
  39. Jim Lloyd
  40. (formerly on the ODF team)